#include<bits/stdc++.h>
using namespace std;
int a[100005];
int cnt[100005];
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    int n;
    cin>>n;
    for(int i=1;i<=n;i++)
        cin>>a[i],cnt[a[i]]++;
    int ans=n;
    int tmp=0;
    for(int i=1;i<=100000;i++){
        // cout<<cnt[i]<<endl;
        if(tmp<cnt[i])
            ans-=tmp,tmp=0;
        else if(tmp>=cnt[i])
            tmp-=cnt[i],ans-=cnt[i];
        tmp+=cnt[i];
    }
    cout<<ans<<"\n";
}